using System.Collections.Generic;
using System.IO;

namespace Cirrostrata.Abstractions.IO
{
    public interface IFileSystem
    {
        void Copy(string sourcePath, string destPath);
        void SaveText(string path, TextReader source, bool preCreateDir);
        TextReader LoadText(string path);
        void SaveBinary(string path, BinaryReader source, bool preCreateDir);
        BinaryReader LoadBinary(string path);
        void SaveStream(string path, Stream source, bool preCreateDir);
        Stream LoadStream(string path);
        bool FileExists(string path);
        IFileSystemMetaData GetMetaData(string path);
        IEnumerable<IFileSystemMetaData> GetFiles(string path, string pattern, bool recurse);
        IEnumerable<IFileSystemMetaData> GetDirectories(string path, string pattern, bool recurse);
        void Delete(string path);
        void CreateDirectory(string path);
        void DeleteDirectory(string path);
    }
}